//
//  OtherDetailFacilityCCell.swift
//  ImGuider X
//
//  Created by 陆涛 on 2018/10/24.
//  Copyright © 2018 imguider. All rights reserved.
//

import UIKit

class OtherDetailFacilityCCell: UICollectionViewCell {

    @IBOutlet weak var textLabel: UILabel!
    override func awakeFromNib() {
        super.awakeFromNib()
        
        self.info = ["客房起价":"¥1610"]
    }
    
    var info:[String:String]? {
        
        didSet {
            
            if let key = info?.keys.first, let value = info?[key] {
                
                
                let att = NSMutableAttributedString(string: value)
                
                att.yy_font = kFont14
                att.yy_color = kTitleColor
                
                att.yy_appendString("\n")

                let att1 = NSMutableAttributedString(string: key)
                att1.yy_font = kFont12
                att1.yy_color = kContentColor
                
                att.append(att1)
                att.yy_lineSpacing = 3
                att.yy_alignment = .center
                
                textLabel.attributedText = att
                
            } else {
                
                textLabel.attributedText = nil
            }
        }
    }

}
